package com.exam.user.api;

import com.exam.user.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

public interface UserApi {

    /**
     * 根据用户名和密码查询用户
     * @param username
     * @param password
     * @return
     */
    @GetMapping("/query")
    User queryUser(@RequestParam("username") String username,
                      @RequestParam("password") String password
    );

    /**
     * 根据ID查找用户
     * @param id
     * @return
     */
    @GetMapping("/id")
    User queryUserById(@RequestParam("id") Long id);

}
